package com.ezhuan.system.pojo;

import java.util.Date;

import com.ezhuan.common.pojo.BasePojo;
import com.ezhuan.users.pojo.AUsers;
import com.ezhuan.users.service.IUsersService;

public class ASuggest extends BasePojo<ASuggest>
{
	private int usersId;
	private String name;
	private String content;
	private int status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;
	
	/* 字符串描述 */
	private String statusStr ; 
	
	/* 对象描述 */
	private AUsers usersObject ; 

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public int getStatus()
	{
		return status;
	}

	public void setStatus(int status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}

	@Override
	public String getTableName()
	{
		return "a_suggest";
	}

	public String getStatusStr()
	{
		// 根据状态值获取字符串描述
		ASuggestEnum[] suggestEnums = ASuggestEnum.values();
		for (int i = 0; i < suggestEnums.length; i++)
		{
			ASuggestEnum suggestEnum = suggestEnums[i];
			if (suggestEnum.toString().startsWith("STATUS_"))
			{
				// 表示是状态的标识
				if (suggestEnum.getStatus() == this.getStatus())
				{
					this.statusStr = suggestEnum.getName();
					break;
				}
			}
		}
		return statusStr;
	}

	public int getUsersId()
	{
		return usersId;
	}

	public void setUsersId(int usersId)
	{
		this.usersId = usersId;
	}

	public AUsers getUsersObject()
	{
		return usersObject;
	}

	public void setUsersObject(AUsers usersObject)
	{
		this.usersObject = usersObject;
	}

}
